﻿Imports System.Data
Imports System.Data.Odbc
Imports WSEntidades
Public Class Sucursales1Fact
    Public Shared Function Build(ByVal dr As OdbcDataReader) As Sucursales1BE
        Dim tmpSucursales1 As Sucursales1BE = New Sucursales1BE()
        Try
            With tmpSucursales1
                .Calle1 = convertDTFromDb.ConvertString(dr.Item("Calle1"))
                .Ciudad1 = convertDTFromDb.ConvertString(dr.Item("Ciudad1"))
                .Colonia1 = convertDTFromDb.ConvertString(dr.Item("Colonia1"))
                .CP1 = convertDTFromDb.ConvertString(dr.Item("CP1"))
                .Descripcion = convertDTFromDb.ConvertString(dr.Item("Descripcion"))
                .Estado1 = convertDTFromDb.ConvertString(dr.Item("Estado1"))
                .IdEmpresa = convertDTFromDb.convertInt32(dr.Item("IdEmpresa"))
                .IdSucursal = convertDTFromDb.convertInt32(dr.Item("IdSucursal"))
                .NumExt1 = convertDTFromDb.ConvertString(dr.Item("NumExt1"))
                .NumInt1 = convertDTFromDb.ConvertString(dr.Item("NumInt1"))
                .Pais1 = convertDTFromDb.ConvertString(dr.Item("Pais1"))
                .Serie = convertDTFromDb.ConvertString(dr.Item("Serie"))
                .Serie1 = convertDTFromDb.ConvertString(dr.Item("Serie1"))
                .Serie2 = convertDTFromDb.ConvertString(dr.Item("Serie2"))
                .Status = convertDTFromDb.ConvertString(dr.Item("Status"))
            End With
            Return tmpSucursales1
        Catch ex As Exception
            Throw
        Finally
            tmpSucursales1 = Nothing
        End Try
    End Function
End Class
